package com.mobi.cacti.rabbit.response;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class ReqTicketCountHandler extends DefaultHandler  {
	
	private String tempVal;
	private ReqTicketCount oClass;
	
	public ReqTicketCountHandler() {
		
	}

	public ReqTicketCount getObj() {
		return oClass;
	}
	
	public void startElement(String uri, String localName, String qName,Attributes attributes) throws SAXException {
		tempVal = "";
		
		if (localName.equalsIgnoreCase("ReqTFASCirCuitCount")) {
			oClass = new ReqTicketCount();
		}
		
		
	}

	public void characters(char[] ch, int start, int length) throws SAXException {
		tempVal = new String(ch, start, length);
	}

	public void endElement(String uri, String localName, String qName) throws SAXException 
	{
		if (qName.equalsIgnoreCase("Circuit_Count")){
			
		}
		else if (qName.equalsIgnoreCase("ReqTFASCirCuitCount")){
			oClass.ticketCount = Integer.parseInt(tempVal);
		}
	}

}
